package concurrency.producercunsumer;

import java.util.concurrent.*;

/**
 * Created by Tzachi on 18/10/2014.
 */
public class Tools {

    public static ExecutorService newFixedThreadPool(int poolSize){
        return new ThreadPoolExecutor(poolSize, poolSize, 0L, TimeUnit.SECONDS, new SynchronousQueue<>(),
                new ThreadPoolExecutor.CallerRunsPolicy());
    }

}
